// 导入二次封装axios
import koi from "@/utils/axios.ts";

// 统一管理接口
enum API {
  LIST_PAGE = "/blog/blogArticle/website/listPage",
  LIST_CAROUSEL = "/blog/blogArticle/website/carousel",
  LIST_RECENT = "/blog/blogArticle/website/recent",
  LIST_SEARCH = "/blog/blogArticle/website/search/listPage",
  PREVIEW_LIBRARY_ARTICLE = "/blog/blogArticle/website/previewLibraryArticle"
}

// 网站首页多条件分页查询
export const listPage = (params: any) => {
  return koi.get(API.LIST_PAGE, params);
};

// 网站首页轮播图
export const listCarousel = () => {
  return koi.get(API.LIST_CAROUSEL);
};

// 网站首页最新三篇
export const listRecent = () => {
  return koi.get(API.LIST_RECENT);
};

// 网站全局搜索
export const listSearch = (params: any) => {
  return koi.get(API.LIST_SEARCH, params);
};

// 预览知识库文章
export const preview = (id: any) => {
  return koi.get(API.PREVIEW_LIBRARY_ARTICLE + "/" + id);
};



